package com.yzh.openai.domain.openai.service.channel.abstractFactory;

import com.yzh.openai.domain.openai.service.channel.factory.ModelGroup;
import com.yzh.openai.domain.openai.service.channel.factory.ChatGLMFactory;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * 模型创建工厂（抽象工厂）
 */
@Service
public abstract class ModelGroupFactory {
    @Resource
    private ChatGLMFactory chatGLMFactory;

    public ModelGroup getModelGroup(String modelName) {
        String model = modelName.toLowerCase();
        if (model.contains("glm") || model.contains("cogview")) return chatGLMFactory;
        return null;
    }

}
